/*
 * str_util.h
 *
 *  Created on: May 8, 2016
 *      Author: Alan Wang
 */

#ifndef UTIL_STR_UTIL_H_
#define UTIL_STR_UTIL_H_

/**
 * copy char str to specified offset
 */
void pstr_copy(char* dst, int dst_pos, char* src, int src_pos, int len);

/**
 * print arr in hex
 */
void prt_pstr_in_hex(char* pstr, int len);

/**
 * convert int to big endian with 4 byte
 */
void int_to_big_endian(char* result, int integer);

/**
 * convert big endian with 4 byte to int
 */
int big_endian_to_int(char* bytes, int len);

#endif /* UTIL_STR_UTIL_H_ */
